package edu.taru.controller;

import edu.taru.pojo.Header;
import edu.taru.service.HeaderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HeaderController {

    private HeaderService head;
    @Autowired
    public HeaderController(HeaderService head){
        this.head = head;
    }
    /**
     * 修改用户头像
     */
    @RequestMapping(value = "/insert/header")
    public String update(Header header){
        head.insertPhoto(header);
        return "redirect:/user/index";
    }

}
